package cn.uyunsky.platform.controller;

import javax.servlet.http.HttpSession;
import java.util.HashSet;
import java.util.Set;

/**
 * User: baiyh
 * Date: 13-6-15
 * Time: 下午6:37
 */
public class ControllerTool {
    /**
     * 此处定义sessiono中的key
     */
    public final static Set<String> sessionKey = new HashSet<String>();

    static {
        sessionKey.add("userid");
        sessionKey.add("username");
        sessionKey.add("roleid");
    }

    public static String getUseridBySession(HttpSession session) {
        return (String) session.getAttribute("userid");
    }
}
